package com.dkha.server.mappers;

import com.dkha.common.modules.vo.camera.CameraInfoVO;
import com.dkha.server.modules.entities.ControlBayonetMid;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dkha.server.modules.entities.FaceCameraEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 布控和摄像头中间表 Mapper 接口
 * </p>
 *
 * @author Spring
 * @since 2019-12-09
 */
@Mapper
public interface ControlBayonetMidMapper extends BaseMapper<ControlBayonetMid> {
    /**
     * 根据任务ID删除任务和摄像头的中间表
     *
     * @Return Integer >0成功
     */
    Integer deletetaskandcarmerbytaskid(@Param("taskID") String taskID);

    Integer selectexistByCarmeID(@Param("idcamera") String idcamera);

    Integer updateCarmerValidaStateByTaskID(@Param("taskID") String taskID, @Param("State") String State, @Param("UpdateBy") String UpdateBy);

    List<FaceCameraEntity> selectFaceCameraBytaskID(@Param("taskID") String taskID);

    List<FaceCameraEntity> selectFaceCameraBytask();

    List<CameraInfoVO> selectFaceCameraBytaskInfo();
    int getControlByRegion(@Param("regionId") long regionId);
}
